package com.phf.vhr.web.controller;

import com.phf.vhr.web.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试
 *
 * @program: vhr-master
 * @description:
 * @author: Peng houfu
 * @create: 2021-09-26 18:13
 **/
@RestController
@RequestMapping("/admin/user")
public class HelloController {
    

    /**
     * user 、 hello
     * @return
     */
    @GetMapping("/hello")  
    @PreAuthorize("hasAnyRole('admin')")
    public Result<String> hello(){
        return Result.success("user/hello");
    }

    /**
     * 通用 
     * 
     * @return
     */
    @GetMapping("/common")
    public Result<String> common(){
        return Result.success("通用");
    }
 }
